package com.example.sjly.ui.scheduling.room;


import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.Index;
import androidx.room.PrimaryKey;
import androidx.room.Query;

import java.util.Calendar;
import java.util.List;

import static android.os.Build.UNKNOWN;
//foreignKeys = @ForeignKey(entity = TOrderIn.class,parentColumns = "id",childColumns = "Emp_id"),
//      indices = @Index(value={"Emp_id"},unique = true),


@Entity(tableName = "TOrderMessage")

public class TOrderMess {
    @PrimaryKey(autoGenerate =true)
    public int id;//用于做主码，不显示
    public String CourseType;//学科类型
    public String ConstructionType;//建设类型
    public String VersionType;//选择版本类型


    public String UserName;//用户名绑定
    public int Tryteach;//是否试讲，1表示是，0表示否
    public int ChoiceCalendarYear;//选择日期
    public int ChoiceCalendarMonth;//选择日期
    public int ChoiceCalendarDay;//选择日期


    public TOrderMess(String courseType, String constructionType,String versionType, int choiceCalendarYear,int choiceCalendarMonth,int choiceCalendarDay,int tryteach) {
        CourseType = courseType;
        ConstructionType = constructionType;
        VersionType = versionType;
        ChoiceCalendarYear = choiceCalendarYear;
        ChoiceCalendarMonth= choiceCalendarMonth;
        ChoiceCalendarDay=choiceCalendarDay;
        Tryteach=tryteach;
    }



    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public TOrderMess() {
        this.id=0;
        this.CourseType=UNKNOWN;
        this.ConstructionType=UNKNOWN;
        this.VersionType=UNKNOWN;
        this.ChoiceCalendarYear=0;
        this.ChoiceCalendarMonth=0;
        this.ChoiceCalendarDay=0;
        this.Tryteach=1;
    }

    @Override
    public String toString() {
        return "TOrderMess{" +
                "id=" + id +
                ",CourseType='" + CourseType + '\'' +
                ", ConstructionType='" + ConstructionType + '\'' +
                ", VersionType='" + VersionType + '\'' +
                ", ChoiceCalendarYear='" + ChoiceCalendarYear + '\'' +
                ", ChoiceCalendarMonth='" + ChoiceCalendarMonth + '\'' +
                ", ChoiceCalendarDay='" + ChoiceCalendarDay + '\'' +
                "Tryteach=" + Tryteach +
                '}';
    }
    public String getUserName() {
        return UserName;
    }

    public void setUserName(String userName) {
        UserName = userName;
    }

    public String getCourseType() {
        return CourseType;
    }

    public void setCourseType(String courseType) {
        CourseType = courseType;
    }

    public String getConstructionType() {
        return ConstructionType;
    }

    public void setConstructionType(String constructionType) {ConstructionType = constructionType; }

    public String getVersionType() {
        return VersionType;
    }

    public void setVersionType(String versionType) {
        VersionType = versionType;
    }

    public int getChoiceCalendarYear() {return ChoiceCalendarYear; }

    public void setChoiceCalendarYear(int choiceCalendarYear) { ChoiceCalendarYear =choiceCalendarYear; }

    public int getChoiceCalendarMonth() {
        return ChoiceCalendarMonth;
    }

    public void setChoiceCalendarMonth(int choiceCalendarMonth) { ChoiceCalendarMonth =choiceCalendarMonth; }

    public int getChoiceCalendarDay() {
        return ChoiceCalendarDay;
    }

    public void setChoiceCalendarDay(int choiceCalendarDay) { ChoiceCalendarDay =choiceCalendarDay; }

    public int getTryteach() {
        return Tryteach;
    }

    public void setTryteach(int tryteach) {
        Tryteach =tryteach;
    }
}

